package com.quectel.taskserver.job.emq;

import com.quectel.sys.module.sys.service.SysConfigService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

/**
 * @author rananxin
 * @date 2021/11/18 7:24 下午
 */
@Component
public class EmqJob implements SimpleJob {

    @DubboReference
    private SysConfigService sysConfigService;

    @Override
    public void execute(ShardingContext shardingContext) {
        return;
//        String emqConfigStr = sysConfigService.getConfigValueByKey(SysConfigKeyConstants.EMQ_CONF);
//        if (StringUtils.isBlank(emqConfigStr)) {
//            return ;
//        }
//        EmqConfigProperty emqConfigProperty = JSONObject.parseObject(emqConfigStr, EmqConfigProperty.class);
//
//        EmqRestUtils instance = EmqRestUtils.getInstance(emqConfigProperty);
//        List<EmqResponse.GetResourcesResponse> resourcesList =
//                instance.getResourcesList();
//
//        System.out.println(JSONObject.toJSON(resourcesList));
    }


}
